Xbasic

Directory Functions

Description

Alpha Anywhere provides the following Directory functions and methods.

Name
Description
A5_GET_WRITEABLE_DRIVES Function

The A5_GET_WRITEABLE_DRIVES() returns a list of drives that are writeable. If a CDROM drive contains a CD that has been formatted for writing, the drive letter of the CDROM drive is included in the list of drives returned by this function.

A5_IS_PATH_VALID Function

The A5_IS_PATH_VALID() function indicates whether a directory exists.

a5_read_write_dictionary Function

Reads or Writes a record to a data dictionary

COPY_FOLDER Function

The COPY_FOLDER() function copies all of the files in the Source_Folder to the Target_Folder. If the Target_Folder does not exist, the function creates it. If the Source_Folder has sub-folders, then the same directory structure is automatically created in the Target_Folder. All sub-folders are copied as well.

DIR_CREATE Function

DIR_CREATE() creates the directory specified by Directory_Name.

DIR_CREATE_RECURSE Function

DIR_CREATE_RECURSE() creates a folder, creating as many subfolders as Necessary. The function returns True (.T.) if it created the folder or if the folder already existed. The function returns False (.F.) if it was unable to create the folder. In the example below, the function was unable to create the "x:\databases" folder, because the "x" drive did not exist.

DIR_GET Function

DIR_GET() returns a string containing the current working directory.

DIR_PUT Function

DIR_PUT() changes the current working directory to the specified Directory_Name.

DIR_REMOVE Function

Remove a directory.

DIR_REMOVE_RECURSE Function

Removes a directory and all of its contents

UI_BROWSE_FOR_COMPUTER Function

The UI_BROWSE_FOR_COMPUTER() function allows you to browse for and select the name of a computer on your network using the standard Windows dialog. The function enables the OK button only if you select a valid computer name.

UI_BROWSE_FOR_FOLDER Function

Prompt user for folder path.

UI_GET_PATH Function

Prompt user for a file path. If drive_list is blank, shows all drives. Drive_list is a semi-colon delimited list of drives. TIP: You can also use ui_browse_for_folder() to use the standard Windows control.

UNZIP_FILELIST Function

The UNZIP_FILELIST() function extracts all or specified files from a ZIP file to a specified directory.